package com.smart.community.region.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 支付信息DTO
 * 
 * @author Wu.Liang
 * @version 1.0.0
 * @since 2025-01-30
 */
@Data
@Schema(description = "支付信息DTO")
public class PaymentInfoDTO {
    
    /**
     * 支付金额
     */
    @NotNull(message = "支付金额不能为空")
    @DecimalMin(value = "0.01", message = "支付金额必须大于0")
    @Schema(description = "支付金额", required = true)
    private BigDecimal paymentAmount;
    
    /**
     * 支付方式
     */
    @NotBlank(message = "支付方式不能为空")
    @Pattern(regexp = "^(CASH|BANK_TRANSFER|ALIPAY|WECHAT_PAY|OTHER)$", 
             message = "支付方式只能是CASH、BANK_TRANSFER、ALIPAY、WECHAT_PAY、OTHER中的一种")
    @Schema(description = "支付方式", required = true, example = "CASH", 
            allowableValues = {"CASH", "BANK_TRANSFER", "ALIPAY", "WECHAT_PAY", "OTHER"})
    private String paymentMethod;
    
    /**
     * 支付日期
     */
    @Schema(description = "支付日期")
    private LocalDateTime paymentDate;
    
    /**
     * 发票号码
     */
    @Size(max = 50, message = "发票号码长度不能超过50个字符")
    @Schema(description = "发票号码")
    private String invoiceNumber;
    
    /**
     * 支付备注
     */
    @Size(max = 500, message = "支付备注长度不能超过500个字符")
    @Schema(description = "支付备注")
    private String paymentRemark;
    
    /**
     * 支付凭证
     */
    @Size(max = 200, message = "支付凭证长度不能超过200个字符")
    @Schema(description = "支付凭证")
    private String paymentVoucher;
}
